***************** Replication of Franchino, Fabio, and Camilla Mariotto. “Bargaining Outcomes and Success in EU Economic Governance Reforms”. Political Science Research and Methods.

* Step 1 to reproduce Figure A7

*************   CREATING RELIABILITY MEASURES FOR THE IVs of TABLE 3
version 16
pause on
clear all
use conflict_data1.dta, clear

* Merging new two coders data
merge 1:1 issue_id country using conflict_data_crosscheck2.dta, gen(_merge)
drop if _merge==2

* Create MM variables
gen MMsuccess=-abs(MMcntry_pos-MMoutcome)
gen MMdistSQ=MMcntry_pos
gen MMdistCOM=abs(MMcntry_pos-MMcomm)
gen MMpos_pres_fin=MMcntry_pos if cou_pres_fin==2
gsort issue_id -MMpos_pres_fin
replace MMpos_pres_fin=MMpos_pres_fin[_n-1] if issue_id==issue_id[_n-1] & MMpos_pres_fin==.
gen MMdistPRES=abs(MMcntry_pos-MMpos_pres_fin)
gen MMdistEP=abs(MMcntry_pos-MMep_1)
bysort issue_id: egen MMcntry_posAVE=mean(MMcntry_pos)
gen MMextreme=abs(MMcntry_pos-MMcntry_posAVE)

* Create LC variables
gen LCsuccess=-abs(LCcntry_pos-LCoutcome)
gen LCdistSQ=LCcntry_pos
gen LCdistCOM=abs(LCcntry_pos-LCcomm)
gen LCpos_pres_fin=LCcntry_pos if cou_pres_fin==2
gsort issue_id -LCpos_pres_fin
replace LCpos_pres_fin=LCpos_pres_fin[_n-1] if issue_id==issue_id[_n-1] & LCpos_pres_fin==.
gen LCdistPRES=abs(LCcntry_pos-LCpos_pres_fin)
gen LCdistEP=abs(LCcntry_pos-LCep_1)
bysort issue_id: egen LCcntry_posAVE=mean(LCcntry_pos)
gen LCextreme=abs(LCcntry_pos-LCcntry_posAVE)
